<template>
  <el-dialog
    :title="$t('提示')"
    :visible.sync="centerDialogVisible"
    :close-on-click-modal="false"
    :close-on-press-escape="true"
    :show-close="true"
    class="my-dialog__wrapper"
    width="80%"
  >
    <div class="serve-content" style="zoom: 2" ref="serveContent"></div>
    <span slot="footer" class="dialog-footer">
      <el-button type="primary" @click="centerDialogVisible = false">{{
        $t("确 定")
      }}</el-button>
    </span>
  </el-dialog>
</template>
<script>

export default {
  data() {
    return {
      centerDialogVisible: false,
    };
  },
  computed: {
    serveContent() {
      return this.$store.state.serveContent
    }
  },
  mounted() {
  },
  methods: {
    async loadLocalRtf() {
      let dom = this.$refs["serveContent"];
      if (this.serveContent) {
        this.serveContent.forEach((element) => {
          dom.appendChild(element);
        });
      }
    },
    openDialog() {
      this.centerDialogVisible = true;
      this.$nextTick(() => {
        this.loadLocalRtf();
      });
    },
  },
};
</script>
